From: Kim F. Storm Date: Tue, 20 Apr 2004 22:16:33 +0000 (+0000) Subject: (image_ascent): Add slice arg; calculate ascent for X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~23054 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=66d0fefde67ec9228491a6a8ab4ad6d60531baf4;p=emacs.git (image_ascent): Add slice arg; calculate ascent for image slice (or full image). --- diff --git a/src/image.c b/src/image.c index 66b004220d1..4c2bdb440e8 100644 --- a/src/image.c +++ b/src/image.c @@ -1076,13 +1076,21 @@ prepare_image_for_display (f, img) drawn in face FACE. */ int -image_ascent (img, face) +image_ascent (img, face, slice) struct image *img; struct face *face; + struct glyph_slice *slice; { - int height = img->height + img->vmargin; + int height; int ascent; + if (slice->height == img->height) + height = img->height + img->vmargin; + else if (slice->y == 0) + height = slice->height + img->vmargin; + else + height = slice->height; + if (img->ascent == CENTERED_IMAGE_ASCENT) { if (face->font)